import { NavBar } from 'antd-mobile';
import React from 'react'
import { useLocation } from 'react-router-dom'
import { useNavigate } from 'react-router-dom';
const Deail = () => {
    const navigate = useNavigate()
    const { state } = useLocation()
    console.log(state);
    return (
        <div>

            <NavBar onBack={() => navigate(-1)}>详情</NavBar>
            <dl style={{
                display: 'flex',
                justifyContent: 'space-between',
                padding: '10px',
            }}>
                <dt>{state.start}-{state.end}</dt>
                <dd>
                    <div>是否高铁:{state.isSeat ? '非高铁' : '高铁'}</div>
                    <div>是否有票:{state.isSpeed ? '无票' : '有票'}</div>
                </dd>
                <dd>
                    <div>
                        <div>商务座:{state.tick.vip}</div>
                        <div>一等座:{state.tick.firstTick}</div>
                        <div>二等座:{state.tick.secondTick}</div>
                    </div>
                </dd>
            </dl>
        </div>
    )
}

export default Deail
